﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using BLL;

namespace Dryricenet.houTai
{
    public partial class Systemlog : System.Web.UI.Page
    {
        public int id = 0;
        protected void Page_Load(object sender, EventArgs e)
        {
            string name = Session["UserName"].ToString();
            DataTable dt = userBLL.selectNameBll(name);
            DataRow dr = dt.Rows[0];//第一条数据
             id = Convert.ToInt32(dr["UserID"]);
            Refresh(id);

        }
        //刷新
        public void Refresh(int id)
        {
            Repeater1.DataSource = LogBLL.LogSelectBLL(id);
            Repeater1.DataBind();
        }
        //删除
        protected void LinkButton1_Click(object sender, EventArgs e)
        {
            int id1 = int.Parse((sender as LinkButton).CssClass);
            OrderDetailsBLL.orderDetailsDeleteBLL(id1);
            LogBLL.logDeleteBLL(id1);
            Refresh(id);
        }
    }
}